#include "MultChannelHead.h"

MultChannelHead::MultChannelHead(int x_, int y_, int w_, int h_, int channelCount_, MCType mcType_) : x(x_), y(y_), w(w_), h(h_), channelCount(channelCount_), mcType(mcType_)
{

}

bool MultChannelHead::TryLoad(std::istream &i)
{
    Load(i, x);
    Load(i, y);
    Load(i, w);
    Load(i, h);
    Load(i, channelCount);
    Load(i, *(uint8_t*)&mcType);
    return true;
}

bool MultChannelHead::TryDump(std::ostream &o)
{
    Dump(o, x);
    Dump(o, y);
    Dump(o, w);
    Dump(o, h);
    Dump(o, channelCount);
    Dump(o, *(uint8_t*)&mcType);
    return true;
}

bool MultChannelHead::IsDumpable()
{
    return !(!x || !y || !w || !h || !channelCount);
}
